STEP 10: Let's have our sprite do something no matter what the user answers! Use the LOGIC tab in the toolkit.

Else catches all inputs that are not "yes". A "yes" answer runs the if block. Otherwise, the else block will run.

  • Click on . Drag out Else. Drop it at the bottom of your program OUTSIDE the if block.
  • In the GRAPHICS tab, click on . Drag Half Court INSIDE the else block.
  • Click on . Drag Basketball INSIDE your else block. Change the name to ball.


To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)